<@home.head>
	<@home.common_list/>
	<script>
		 var deleteMenu = function(id)
		 {
			var deleteSubmit = function(v){
				if(!v){
					return true;
				}
				 $.ajax({
					 url:"menu_del.shtml",
					 dataType:'json',
					 data:'id='+id+"&random="+Math.random(),
					 success:function(data){
						if(data.code=="200")
				　　		{
				　　			$.jBox.tip('删除菜单成功','success',{closed:function() {top.submitQuery();}});
						}else{
							$.jBox.tip(data.msg);
							return false;
						}
				 	}
				});
			};
			parent.$.jBox.confirm("删除菜单后所有角色及用户对该菜单的权限都将删除,确认要删除吗 ?","操作提示",  deleteSubmit, { buttons: { '确定': true, '取消': false} });
		 };
	</script>
</@home.head>
<@home.body>
	<table width="100%" height="100%" class="listTable" cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th class="td_h">所属菜单</th>
				<th class="td_h">菜单编码</th>
				<th class="td_h">菜单名称</th>
				<th class="td_h">排序</th>
				<th class="td_h">菜单对应的链接</th>
				<th class="td_h">操作</th>
			</tr>
		</thead>
		<tbody>
			<#if pageVO?exists && pageVO.resultList?exists>
				<#list pageVO.resultList as sysMenu>
					<tr>
						<td class="td_r">${sysMenu.parentCode}&nbsp;</td>
						<td class="td_r">${sysMenu.menuCode}&nbsp;</td>
						<td class="td_r">${sysMenu.menuName}&nbsp;</td>
						<td class="td_r">${sysMenu.taxis}&nbsp;</td>
						<td class="td_r">${sysMenu.linkUrl}&nbsp;</td>
						<td class="td_r"  style="width:120px;">	
							<#if AUTH_EDIT?? && AUTH_EDIT==1>
								<span title="编辑" class="img_edit hand" onclick="showDialogOnParent('${basePath}/sysmanage/dev/jump_menu_edit_page.shtml?menuCode=${sysMenu.menuCode}','修改菜单')"></span>
							</#if>
							<#if AUTH_DEL?? && AUTH_DEL==1>
								<span title="删除" class="img_delete hand" onclick="deleteMenu('${sysMenu.menuCode}');"></span>
							</#if>
						</td>
					</tr>
				</#list>
			<#else>
				<tr>
					<td class="td_noresult" colspan="11">暂无相关数据!</td>
				</tr>
			</#if>
		</tbody>
	</table>
	<#if pageVO?exists>
		<script>
			$(this).pagination({
				'rowCount':${pageVO.rowCount},
				'pageNum':${pageVO.pageNum},
				'pageNo':${pageVO.pageNo},
				'pageSize':${pageVO.pageSize},
				'firstBtnHandler':'fanYe(1)'
			});
		</script>
	</#if>
	
</@home.body>
